package com.liang.set;

import java.util.Set;
import java.util.TreeSet;

public class TreeSetDemo {
    public static void main(String[] args) {
        Set<Student> arr = new TreeSet<>();

        Student stu1 = new Student("小花",28);
        Student stu2 = new Student("小花花",29);
        Student stu3 = new Student("小小花",26);
        arr.add(stu1);
        arr.add(stu2);
        arr.add(stu3);

        System.out.println(arr);

    }
}
